<template>
  <div class="aui-card-list">
    <el-card shadow="never" class="aui-card-list-body">
      <vxe-toolbar setting>
        <template v-slot:buttons>
        </template>
        <template v-slot:tools>
          <el-button icon="el-icon-refresh" @click="getDataList()" circle></el-button>
        </template>
      </vxe-toolbar>
      <vxe-table ref="xTable" :loading="dataListLoading" class="vxe-table-element"
                 max-height="auto"
                 auto-resize
                 :data="dataList">
        <vxe-table-column type="index" header-align="center" align="center" width="50"></vxe-table-column>
        <vxe-table-column field="queueName" title="队列编码">
        </vxe-table-column>
        <vxe-table-column field="queueDesc" title="队列描述">
        </vxe-table-column>
        <vxe-table-column field="queueSize" title="队列数量（当前值/最大值）" align="right" width="180">
          <template slot-scope="scope">
            {{scope.row.currQueueSize}}/{{scope.row.queueSize}}
          </template>
        </vxe-table-column>
        <vxe-table-column field="consumerNum" title="队列消费者数（当前值/最大值）" align="right" width="200">
          <template slot-scope="scope">
            {{scope.row.currConsumerNum}}/{{scope.row.consumerNum}}
          </template>
        </vxe-table-column>
        <vxe-table-column field="sleepMillisecond" title="休眠时间" align="right" width="120">
        </vxe-table-column>
        <vxe-table-column field="sleepMaxInterval" title="休眠间隔" align="right" width="100">
        </vxe-table-column>
      </vxe-table>
    </el-card>
  </div>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
  mixins: [mixinViewModule],
  data () {
    return {
      mixinViewModuleOptions: {
        getDataListURL: '/queue/apiQueueMonitor/list',
        getDataListIsPage: false
      }
    }
  }
}
</script>
